package com.example.designModel.decorate.secondwear;

import java.io.Console;

/**
 * XXXXXXXXX
 *
 * @author brad zhang
 * @version 2.0
 * @date 2021/11/17 15extends56
 */
public class Program {

    public static void main(String[] args) {
        Person xc = new Person("小菜");
        System.out.println("\n第一种装扮：");
        Finery dtx = new TShirts();
        Finery kk = new BigTrouser();
        Finery pqx = new Sneakers();
        dtx.Show();
        kk.Show();
        pqx.Show();
        xc.Show();
        System.out.println("\n第二种装扮：");
        Finery xz = new Suit();
        Finery ld = new Tie();
        Finery px = new LeatherShoes();
        xz.Show();
        ld.Show();
        px.Show();
        xc.Show();
        System.out.println();
    }

    public static class Person
    {
        private String name;
        public Person(String name)
        {
            this.name = name;
        }

        public void Show()
        {
            System.out.printf("装扮的%s", name);
        }
    }

    //服饰
    static abstract class Finery
    {
        public abstract void Show();
    }

    //大T恤
    static class TShirts extends Finery
    {
        @Override
        public  void Show()
        {
            System.out.println("大T恤 ");
        }
    }

    //垮裤
    static class BigTrouser extends Finery
    {
        public  void Show()
        {

            System.out.println("垮裤 ");
        }
    }

    //破球鞋
    static class Sneakers extends Finery
    {

        public  void Show()
        {

            System.out.println("破球鞋 ");
        }
    }

    //西装
    static class Suit extends Finery
    {

        public  void Show()
        {

            System.out.println("西装 ");
        }
    }

    //领带
    static class Tie extends Finery
    {

        public  void Show()
        {

            System.out.println("领带 ");
        }
    }

    //皮鞋
    static class LeatherShoes extends Finery
    {

        public  void Show()
        {

            System.out.println("皮鞋 ");
        }
    }

}
